<style>
    .scroll-container {
       width: 200px;
       height: 100px;
       border: 1px solid black;
       overflow-x: auto;
     }
    .scroll-container ul {
       list-style: none;
       margin: 0;
       padding: 0;
       white-space: nowrap;
     }
    .scroll-container li {
       display: inline - block;
     }
   </style>
   <div class="scroll - container">
     <ul>
       <li>项目1</li>
       <li>项目2</li>
       <li>项目3</li>
     </ul>
   </div>